package com.test.mylotterysystem.controller.Param;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class PageParam {
    @NotNull(message = "当前页数不能为空")
    private Integer currentPage;
    @NotNull(message = "页数大小不能为空")
    private Integer pageSize;

    public int offset(int currentPage, int pageSize) {
        return (currentPage - 1) * pageSize;
    }
}
